<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<title>在平安</title>
<meta name="description" content="中国平安" />
<meta name="keywords" content="中国平安" />
<meta content="width=640, target-densitydpi=320, user-scalable=no" name="viewport" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta content="telephone=no" name="format-detection" />
<link rel="stylesheet" type="text/css" href="../css/base.css">
<link rel="stylesheet" type="text/css" href="../css/public.css">
<script src="../js/zepto.min.js" type="text/javascript"></script>
<script src="../js/zepto-touch.js" type="text/javascript"></script>
<script src="../js/underlingReport/xslb-pingfen.js" type="text/javascript"></script>
<script src="../js/iscroll.js" type="text/javascript"></script>
<script src="../js/public.js" type="text/javascript"></script>
<style>
/*
*  此样式为页面级不能放在公共文件中
*/

#wrap{position: absolute;width: 100%;height: 100%;overflow:hidden;}

</style>
</head>

<body>
<div class="g-mask" id="loadingText">
	<div class="loading-mask-bg"></div>
	<div class="loading-mask-img"><img src="../images/loading.gif" width="70" height="70"></div>
</div>
<div id="wrap">
	<div class="top-bar">
		<div class="top-bar-cont">
			<span id="back" class="btn-bar-css btn-bar-back btn-bar-left"><i></i></span>
			<h1><span id="reprotTitle"></span></h1>
		</div>
	</div>
	<section id="content" style="-webkit-transform:translate3d(0,0,0);">
		<div>
		<div id = "gjxx">
	        <div class="kpi-module m-b18">
	            <h2 class="kpi-h2 row-webkit-box">
	                <div class="info-list-cont">关键工作计划</div> 
	            </h2>
	            <div class="kpi-main">
	                <div class="score-table score-table-col4">
	                    <div class="score-table-header">
	                        <ul>
	                            <li>关键工作计划</li>
	                            <li>权重</li>
	                            <li>自评分</li>
	                            <li>评分</li>
	                        </ul>
	                    </div>
	                    <div class="score-table-tbody">
	                        <ol id="workPlanDetail" class="row-info-list">
	                        	
	                        </ol>
	                    </div>
	                </div>
	            </div>
	        </div>
		</div>
        <div class="row-info row-info-readonly single-row m-b18">
            <ul class="row-info-list">
                <li>
                    <div class="row-btn-txt">自评分：<span id="selfGrade" class="fn-c-fa4043"></span>分</div>
                </li>
            </ul>
        </div>
        <div id="firstReview">
        
        </div>
        <div id="secondReview" class="score-opeate">
            <div class="kpi-content row-info edit-row"> 
                <ul class="row-info-list" id="J-EditContent">
                    <li class="edit-row-cont">                            
                        <div class="click-cont-area">
                            <div class="info-list-name">您的意见：</div>
                            <div class="info-list-cont"><textarea id="assessMsg" style="width: 80%;" onfocus="reset(this)" onblur="ResizeTextarea(this,2)" oninput="ResizeTextarea(this,2)" onkeyup="ResizeTextarea(this,2)" placeholder="请输入"></textarea></div>
                        </div>
                    </li>
                </ul>
            </div>
            <div class="score-opeate-title">
                <div class="score-opeate-icon">
                    <i></i>
                    <div class="opeate-icon-cont" id="J-StaffNum">...</div>
                </div>
                <div style="height:190px;-webkit-box-pack:initial;" class="opeate-title-txt"><span id="rating_descr"></span> : <span style="padding-top:0px;" id="opinionMsg">请拨动标尺对<span class="fn-c-3580d5" id="staffName"></span>的<span class="fn-c-3580d5" id="staffMonth"></span><span  id="tisi">月汇报评分</span></span></div>
            </div>
        </div>
		<div class="score-opeate-content">
		    <div class="staff-main">
		        <div class="staff-btn btn-minus" id="J-BtnMinus"></div>
		        <div class="staff-img">
		            <div class="staff-img-cont" id="J-Staff">                            
		                <div class="staff-img-move"></div>
		                <div class="staff-img-line"></div>
		            </div>
		            <div class="staff-img-buoy"></div>
		        </div>
		        <div class="staff-btn btn-add" id="J-BtnAdd"></div>
		    </div>
		</div>
		</div>
   	</section>
	<footer class="footer-fixed" id="FooterFixed" style="width:100%;left:0;bottom:0;">
	    <div class="footer-fixed-cont">            
	        <div class="footer-fixed-bg"></div>
	        <div class="footer-btn">
	            <div class="btn-css btn-bg-72cb09" id="J-BtnSave">保存</div>
	            <div class="btn-css m-l44" style="display:none;" id="J-Reject">驳回</div>
	            <div class="btn-css m-l44" id="J-Submit">提交</div>
	        </div>
	    </div>
	</footer>
</div>
<div class="g-mask" id="GlobalMask">
    <div class="g-mask-bg"></div>
    <div class="g-mask-layout">
        <article class="g-mask-content">        
            <section class="g-mask-cont">
                <p>提交后不能修改，确认提交吗？</p>
            </section>
            <footer class="g-mask-cont-btn">
                <div class="btn-css btn-left fn-c-999" id="MaskBtnCancel">放弃</div>
                <div class="btn-css btn-right fn-c-157efb" id="MaskBtnSubmit">提交</div>
            </footer>
        </article>
    </div>
</div>
<div class="g-mask" id="SaveMask">
    <div class="g-mask-bg"></div>
    <div class="g-mask-layout">
        <article class="g-mask-content">        
            <section class="g-mask-cont">
                <p>确定要保存此页面信息吗？</p>
            </section>
            <footer class="g-mask-cont-btn">
                <div class="btn-css btn-left fn-c-999" id="CancelBtn">放弃</div>
                <div class="btn-css btn-right fn-c-157efb" id="SaveBtn">保存</div>
            </footer>
        </article>
    </div>
</div>
<div class="g-mask" id="RejectMask">
    <div class="g-mask-bg"></div>
    <div class="g-mask-layout">
        <article class="g-mask-content">        
            <section class="g-mask-cont">
                <p>你确定要驳回<span id="rejectName"></span>的月度汇报吗?</p>
            </section>
            <footer class="g-mask-cont-btn">
                <div class="btn-css btn-left fn-c-999" id="RejectBtnCancel">放弃</div>
                <div class="btn-css btn-right fn-c-157efb" id="RejectBtnSubmit">驳回</div>
            </footer>
        </article>
    </div>
</div>
<div class='check-prompt' id='errorMask' style="display: none;">
  <div class='check-prompt-bg'></div>
  <div class='check-prompt-txt' id="message">网络异常</div>
</div>
<div style="display: none;">
	<input id="detailLen" type="hide"/>
	<input id="nowAssess" type="hide"/>
</div>
<div id="reportMaster" style="display: none;">
	<input id="EMPLID" type="hide"/>
	<input id="EP_APPRAISAL_ID" type="hide"/>
	<input id="EP_MANAGER1_ID" type="hide"/>
	<input id="EP_MANAGER2_ID" type="hide"/>
	<input id="EP_MANAGER3_ID" type="hide"/>
	<input id="EP_TEMPLATE_ID" type="hide"/>
	<input id="EVA_GROUP_ID" type="hide"/>
	<input id="GRADED_CYC" type="hide"/>
	<input id="MONTH_EP" type="hide"/>
	<input id="PAIC_MON_STATUS" type="hide"/>
	<input id="YEAR_EP" type="hide"/>
</div>
<script>
var offsetX = -221, i = 1,m=0, staffNum = 3.9;

$("#J-Staff").on("touchmove", function(event){
    var touch = event.touches[0];
    event.preventDefault();  
    if(i===4){
        if(touch.pageX < m ){
            offsetX -= 10;staffNum += 0.1;
        }else{
            offsetX += 10;staffNum -= 0.1;
        }       
        if(offsetX>=-101){offsetX = -101;staffNum = 2.7;}
        if(offsetX<=-331){offsetX = -331;staffNum = 5.0;}
        $("#J-StaffNum").text(new Number(staffNum).toFixed(1));
        $(this).find(".staff-img-move").css("left", offsetX);
        i= 1;
        
        m = touch.pageX;
    }
    i++;
    setOpinionMsg(staffNum);
 	// 重新设置滚动页面高度
 	myiscroll.refresh();
});
$("#J-BtnMinus").on("tap", function(event){
	if(offsetX < -101){
		offsetX += 10;
		staffNum -= 0.1;
	}
	$("#J-StaffNum").text(new Number(staffNum).toFixed(1));
    $("#J-Staff").find(".staff-img-move").css("left",offsetX);
    setOpinionMsg(staffNum);
 	// 重新设置滚动页面高度
 	myiscroll.refresh();

});
$("#J-BtnAdd").on("tap", function(event){
	if(offsetX > -331){
		offsetX -= 10;
		staffNum += 0.1;
	}
	$("#J-StaffNum").text(new Number(staffNum).toFixed(1));
    $("#J-Staff").find(".staff-img-move").css("left",offsetX);
    setOpinionMsg(staffNum);
 	// 重新设置滚动页面高度
 	myiscroll.refresh();
});
function reset(obj){
	console.log((-myiscroll.maxScrollY)>0);
	if((-myiscroll.maxScrollY)>0){
		myiscroll.scrollTo(0,myiscroll.maxScrollY,0);
	}
}

//改变输入文本框高度
var b = 1;
function ResizeTextarea(a,row){
	var tempStr = a.value;
    var pattern_char = /[a-zA-Z0-9]/g;
    var pattern_chin = /[\u4e00-\u9fa5]/g;
	if(tempStr.split("\n").length!=b){
		row += tempStr.split("\n").length - b;
	}
	if(tempStr != " "&& tempStr != null){
		tempStrs = tempStr.split("\n");
		var len = tempStr.split("\n").length;
		tempStr = tempStrs[len-1];
		//console.log(tempStr);
	    var chars = tempStr.match(pattern_char);
	    var chins = tempStr.match(pattern_chin);
	    if(chars!=null){
	    	var count_char = chars.length;
		    row += count_char/30;
	    }
	    if(chins!=null){
	    	var count_chin = chins.length;
		    row += count_chin/14;
	    	
	    }
	}
    a.rows = row;
    //myiscroll.refresh();
}
</script>
</body>
</html>
